import request from '@/utils/request'

export function getUserOrderList(data) {
  return request({
    url: '/user/order/getUserOrderList',
    method: 'post',
    data
  })
}
export function orderInfo(data) {
  return request({
    url: '/user/order/orderInfo',
    method: 'post',
    data
  })
}
// 取消订单
export function cancelOrder(data) {
  return request({
    url: '/user/order/cancelOrder',
    method: 'post',
    data
  })
}
// 确定收货
export function confirmAccept(data) {
  return request({
    url: '/user/order/confirmAccept',
    method: 'post',
    data
  })
}
// 延长收货
export function urgeOrder(data) {
  return request({
    url: '/user/order/urgeOrder',
    method: 'post',
    data
  })
}
// 删除订单
export function delOrder(data) {
  return request({
    url: '/user/order/delOrder',
    method: 'post',
    data
  })
}
// 售后
export function orderAfterList(data) {
  return request({
    url: '/user/order/orderAfterList',
    method: 'post',
    data
  })
}
export function orderAfterInfo(data) {
  return request({
    url: '/user/order/orderAfterInfo',
    method: 'post',
    data
  })
}
// 发起
export function initiateAfterSales(data) {
  return request({
    url: '/user/order/initiateAfterSales',
    method: 'post',
    data
  })
}
// 售后订单提交物流信息
export function orderAfterSubmitLogistics(data) {
  return request({
    url: '/user/order/orderAfterSubmitLogistics',
    method: 'post',
    data
  })
}
// 获取订单售后原因
export function orderReturnReason(data) {
  return request({
    url: '/user/order/orderReturnReason',
    method: 'post',
    data
  })
}
// 确认商品订单
export function confirmGoodsOrder(data) {
  return request({
    url: '/user/order/confirmGoodsOrder',
    method: 'post',
    data
  })
}
// 创建商品订单
export function createGoodsOrder(data) {
  return request({
    url: '/user/order/createGoodsOrder',
    method: 'post',
    data
  })
}
// 支付订单
export function payOrder(data) {
  return request({
    url: '/user/order/payOrder',
    method: 'post',
    data
  })
}

// 创建会员订单
export function createMemberOrder(data) {
  return request({
    url: '/user/order/createMemberOrder',
    method: 'post',
    data
  })
}

// 物流单号识别
export function identiylogistics(data) {
  return request({
    url: '/user/order/identiylogistics',
    method: 'post',
    data
  })
}

// 修改地址
export function updateAddress(data) {
  return request({
    url: '/user/order/updateAddress',
    method: 'post',
    data
  })
}

// 查询快递详细信息
export function expressDetails(data) {
  return request({
    url: 'https://poll.kuaidi100.com/poll/query.do',
    method: 'post',
    data,
    isThirdParty: true
  })
}

// 售后订单用户确认收货
export function afterSaleConfirm(data) {
  return request({
    url: '/user/order/orderAfterConfirm',
    method: 'post',
    data
  })
}
